package xyz.zhzby.cyzx.cms.constant;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import xyz.zhzby.cyzx.servicebase.exception.AbstractErrorMessageEnum;

/**
 * @author zby
 * @date 2021/12/12
 */
@Getter
@AllArgsConstructor
@ApiModel("CMS模块异常枚举类")
public enum CmsErrorMessageEnum implements AbstractErrorMessageEnum {

    EMPTY_FAILED(-2, "填写的数据不能为空"),
    NOT_EXIST(-2, "文章不存在"),
    ;

    private Integer value;
    private String desc;

    @Override
    public String getErrorMessage() {
        return this.desc;
    }

    @Override
    public Integer getCode() {
        return this.value;
    }
}
